<!--%import("filter/write_document.xml")-->

<!--#include("header.include.html")-->

<form action="./" method="post" onsubmit="return procFilter(this, write_document)" class="writeForm">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />

    <h3>{$lang->cmd_ask}</h3>

    <table border="1" cellspacing="0">
    <!--@if($module_info->use_category=="Y")-->
    <tr>
        <th scope="row" style='width:9%'>{$lang->ask_category}</th>
        <td>
            <select name="category_srl" class="category">
                <option value="">{$lang->category}</option>
                <!--@foreach($categories as $val)-->
                <option value="{$val->category_srl}" <!--@if($val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@endif-->>
                    {str_repeat("&nbsp;&nbsp;",$val->depth)} {$val->title} ({$val->document_count})
                </option>
                <!--@endforeach-->
            </select>
        </td>
    </tr>
    <!--@endif-->

    <tr>
        <th scope="row">{$lang->title}</th>
        <td class="title"><input type="text" name="title" class="title" value="{htmlspecialchars($oDocument->get('title'))}" /></td>
    </tr>
    </table>

    <div class="editor">
        {$oDocument->getEditor()}
    </div>

    <table border="1" cellspacing="0">
    <tr>
        <th scope="row" style='width:9%'>{$lang->give_point}</th>
        <td>
            <!--@if($oDocument->isExists())-->
                <strong>{number_format($oDocument->get('point'))} {$point_name}</strong>
            <!--@else-->
                <input type="text" name="give_point" value="{$max_point}" class="givePoint" /> /{number_format($limit_point)} {$point_name}
            <!--@end-->
            <p>{sprintf($lang->about_give_point, $min_point, $limit_point)}</p></td>
        </td>
    </tr>
    </table>

    <div class="buttonArea">
        <span class="button strong black"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
        <span class="button"><button type="button" onclick="location.href='{getUrl('act','','title','')}';return false;">{$lang->cmd_back}</button></span>
    </div>

</form>

<!--#include("footer.include.html")-->
